import request from '@/utils/request'

// 查询门店分类列表
export function listBrand(query) {
  return request({
    url: '/prod-api/system/group/list',
    method: 'get',
    params: query
  })
}

export function bulidBrandSelect() {
  return request({
    url: '/prod-api/system/group/bulidSelect',
    method: 'get'
  })
}

// 修改门店分类状态
export function updateBrandStatus(groupId, dataStatus){
  const data = {
    groupId,
    dataStatus
  } 
  return request({
    url: '/prod-api/system/group/updateBrandStatus',
    method: 'put',
    data: data
  })
}

// 查询门店分类详细
export function getBrand(brandUid) {
  return request({
    url: '/prod-api/system/group/' + brandUid,
    method: 'get'
  })
}

// 新增门店分类
export function addBrand(data) {
  return request({
    url: '/prod-api/system/group/add',
    method: 'post',
    data: data
  })
}

// 修改门店分类
export function updateBrand(data) {
  return request({
    url: '/prod-api/system/group/edit',
    method: 'put',
    data: data
  })
}

// 删除门店分类
export function delBrand(brandUid) {
  return request({
    url: '/prod-api/system/group/' + brandUid,
    method: 'delete'
  })
}
